home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / pascal / mathlib.exe / MATHLIB.DOC < prev    next >
Text File  |  1991-11-30  |  18KB  |  345 lines

  1.                    Math Libraries (MATHLIB) for Turbo Pascal
  2.                      Copyright (c) 1991, Waldman Sidelines
  3.        Harness the Power of the Advanced Coprocessors in Your Programs!
  4.                                        
  5.                                Waldman Sidelines
  6.                                 Cye H. Waldman
  7.                             Post Office Box 231157
  8.                            Encinitas, CA  92023-1157
  9.                     Tel: (619) 942-3016 : CSERVE 72245,1337
  10.                                        
  11.                                        
  12.                                  INTRODUCTION
  13.                                        
  14. MATHLIB offers Turbo Pascal users enhanced math function libraries specifically 
  15. written to tap the power of the 80287 and 80387 coprocessors.  All of the 
  16. intrinsic trigonometric and exponential functions plus nine additional ones 
  17. have been hand-coded in assembly language specifically for each coprocessor.  
  18. These nine additional functions were also coded in Pascal for use with any or 
  19. no coprocessor.  MATHLIB provides a consistent set of Turbo Pascal units for 
  20. use with any type of PC with improved performance for advanced coprocessors.
  21.  
  22. MATHLIB should be of particular interest to those performing numerically 
  23. intensive computations such as scientific and engineering calculations and 
  24. graphics applications which require coordinate transformations using 
  25. trigonometric relations.
  26.  
  27. This program is a shareware product.  You may distribute the original shareware 
  28. disk (not including the source code) to your friends for evaluation.  If you 
  29. use this program you are expected to register it with Waldman Sidelines.  
  30.  
  31. Your registration fee entitles you to use this software on a single computer 
  32. and to make as many copies of this software as you wish for your own backup 
  33. purposes.  Site licenses are available; call for details.  You may not use
  34. MATHLIB in a commercial product; a separate licence agreement must be 
  35. established with Waldman Sidelines.
  36.  
  37. Upon receipt of your registration you will receive a disk with the Pascal 
  38. source and the assembled object code required to compile the units, as well 
  39. as some bonus software (keep reading).  (Contact the author regarding 
  40. availability of the assembly language source code.) In addition, you will 
  41. receive notifications of future software updates.
  42.  
  43.                               LIMIT OF LIABILITY
  44.                                
  45. MATHLIB is distributed as-is. The author disclaims all warranties expressed or 
  46. implied.  The author will assume no liability for damages either from direct 
  47. use of this product or as a consequence of the use of this product.
  48.  
  49.                                    COPYRIGHT
  50.                                        
  51. MATHLIB is copyrighted with all rights reserved to Waldman Sidelines.
  52.                                        
  53.                                   TRADEMARKS
  54.  
  55. Turbo Pascal is a registered trademark of Borland International, Inc.
  56. 386MAX is a registered trademark of Qualitas, Inc.
  57. NetRoom is a trademark of Helix Software Company, Inc.
  58. Microsoft and MS-DOS are registered trademarks of Microsoft, Inc.
  59.  
  60. MATHLIB Documentation                                                   Page 1
  61.                                   DESCRIPTION
  62.  
  63. Three Turbo Pascal 6.0 units (TPU files) are provided with this software.  Two 
  64. of these provide faster floating point calculation by directly accessing the 
  65. advanced instruction set of the '287 and '387 coprocessors.  (These are not 
  66. accessible to math functions compiled under Turbo Pascal which is limited to 
  67. the 8087 instruction set.) The three units are MathLib (for use on any 
  68. machine, including those without a coprocessor), P287MathLib (for use only 
  69. with a '287 or better coprocessor) and P387MathLib (for use only with a '387 
  70. or better coprocessor).  These units are in files MATHLIB.TPU, P287MATH.TPU, 
  71. and P387MATH.TPU, respectively.  The units also contain a number of functions 
  72. which are not in the standard library.  These functions are coded in Pascal in 
  73. MathLib and in assembly language in P287MathLib and P387MathLib.  Units 
  74. P287MathLib and P387MathLib also contain assembly language replacements for 
  75. the intrinsic functions in the System Unit (i.e., ARCTAN, COS, EXP, LN, SIN).
  76.  
  77. These libraries are intended for users familiar with Turbo Pascal and the use 
  78. of units.  Those not familiar with units should refer to the Turbo Pascal 
  79. manuals.
  80.  
  81.                                 NOTES ON USAGE
  82.  
  83. 1.  Functions supported by all libraries (in alphabetical order):
  84.  
  85.     NOTE: The instrinsic transcendental functions from the Turbo Pascal System 
  86.     Unit (i.e., ARCTAN, COS, EXP, LN, SIN) can be of any type and are not
  87.     limited to type DOUBLE.  That would be the case in UNIT MathLib.
  88.     
  89.     FUNCTION ArcCOS(x: DOUBLE):DOUBLE;          { arc cosine function }
  90.  
  91.     FUNCTION ArcSIN(x: DOUBLE):DOUBLE;          { arc sine function }
  92.  
  93.     FUNCTION ARCTAN(x: DOUBLE):DOUBLE;          { arc tangent function }
  94.     
  95.     FUNCTION ArcTangent(x,y: DOUBLE):DOUBLE;    { optional arc tan function }
  96.     { returns arctan(y/x) in the proper quadrant, e.g., 0-360 degrees }
  97.     
  98.     FUNCTION COS(x:DOUBLE):DOUBLE;              { cosine function }
  99.     
  100.     FUNCTION EXP(x:DOUBLE):DOUBLE;              { exponential fn, e^x }
  101.     
  102.     FUNCTION Expo(x,y:DOUBLE):DOUBLE;           { exponential fn, x^y }
  103.     
  104.     FUNCTION LN(x:DOUBLE):DOUBLE;               { natural logarithm function }
  105.     
  106.     FUNCTION LOG(x:DOUBLE):DOUBLE;              { common logarithm function }
  107.     
  108.     FUNCTION SIN(x:DOUBLE):DOUBLE;              { sine function }
  109.     
  110.     PROCEDURE SINCOS(x:DOUBLE; VAR y,z:DOUBLE); { sine/cosine procedure }
  111.     { returns both sine and cosine; y = SIN(x), z = COS(x) }
  112.     
  113.     FUNCTION TAN(x:DOUBLE):DOUBLE;              { tangent function }
  114.     
  115.     FUNCTION Ten2TheX(x:DOUBLE):DOUBLE;         { exponential fn, 10^x }
  116.  
  117.     FUNCTION Two2TheX(x:DOUBLE):DOUBLE;         { exponential fn, 2^x }
  118.  
  119. MATHLIB Documentation                                                   Page 2
  120. 2.  Libraries are valid only for type DOUBLE.  (The author has found type
  121.     DOUBLE to be faster than type REAL.)
  122.  
  123. 3.  Libraries are compiled in Turbo Pascal 6.0 with the /v option.  Object
  124.     code is compiled with TASM 2.01 in the IDEAL mode with the TPASCAL MODEL.
  125.  
  126. 4.  Standard USES convention; e.g., USES MathLib or USES P287MathLib or
  127.     USES P387MathLib. (Can't mix 'n' match libraries; use one or the other.)
  128.  
  129. 5.  Install the three TPU files in a directory where Turbo Pascal will find
  130.     them and use them in the normal way.  E.g., can be USED in other units.
  131.  
  132. 6.  The advanced libraries (Px87MathLib) automatically supersede the intrinsic
  133.     math functions.  No explicit action is required on the part of the user.
  134.  
  135. 7.  Hardware-specific software can be developed by changing a single line of
  136.     code and recompiling.  E.g., USES MathLib ==> USES P387MathLib.
  137.  
  138. 8.  These libraries have been in use for about two years in mathematical
  139.     models of physical systems developed by the author.  Speed increases of
  140.     up to 40% have been observed in computationally intensive programs.
  141.  
  142. 9.  Until you become familiar with these programs it would be prudent to
  143.     verify that they give the results you expect by comparing output from the
  144.     same program compiled with the basic and advanced units.
  145.  
  146. 10. Registered users will receive a registration number and all Pascal source
  147.     code and assembled object code.  The source and object codes will allow 
  148.     compilation to past and future versions of Turbo Pascal without an 
  149.     assembler.  The registered version does not contain the initialization 
  150.     shareware information screen.  In addition, you will receive bonus 
  151.     software for the Wichmann-Hill random number generator (Byte, March 1987) 
  152.     in assembly and a solar/lunar ephemeris unit (both with source code).
  153.  
  154. 11. Technical support is available on CompuServe at ID 72245,1337.
  155.  
  156.                                 CUSTOM V